package com.example.template.utils;

import org.springframework.stereotype.Component;
import org.springframework.util.DigestUtils;

/**
 * @className: TokenUtil
 * @description: Token工具类
 * @author: Kuangkeli
 * @date: 2024/01/20 16:25
 **/
@Component
public class TokenUtil {
    public  String generateTokenValue(String clientType,long userid,String password){
        String originalTokenValue = userid+clientType+password+DateUtil.getCurrnetTimeMs();
        return DigestUtils.md5DigestAsHex(originalTokenValue.getBytes());
    }
}
